{load file="__TPL__/company/company_top.html" /}
{css file="__TPL__/css/company_recruit.css" /}
<div id="content">
<!--opt-->
<div id="opt">
<!--menu-->
<div id="opt-menu">
<dl>
    <dt>职位管理</dt>
    <dd><a href="__CONTROL__/issueRecruit.html">发布职位</a></dd>
    <dd><a href="__CONTROL__/recruit.html">职位管理</a></dd>
   <dt>企业推广</dt>
    <dd><a href="__APP__/company/template.html">企业模板</a></dd>
    <dd><a href="__APP__/company/addSpread/cate/5.html">职位置顶</a></dd>
    <dd><a href="__APP__/company/addSpread/cate/2.html">紧急招聘</a></dd>
    <dd><a href="__APP__/company/addSpread/cate/1.html">推荐职位</a></dd>
    <dd><a href="__APP__/company/addSpread/cate/6.html">职位变色</a></dd>
    <dt>企业资料</dt>
    <dd><a href="__APP__/company/data">企业资料</a></dd>
    <dd><a href="__APP__/company/account">账户管理</a></dd>
    <dd><a href="__APP__/company/optLog">操作日志</a></dd>
</dl>
</div>
<!--/menu-->
<!--opt-area-->
<div id="opt-area">
<!--企业招聘管理-->
<div class="feature-list">
    <h2 class="data-title">管理职位列表</h2>
    <div id="recruit-list">
        <div id="cond-nav">
            <div id="cond-tab">
                <a {if value="!$hd.get.state|isset"}class="cond-tab-active"{/if} href="__METH__">所有职位</a>
                <a {if value="$hd.get.state|isset && $hd.get.state==1"}class="cond-tab-active"{/if} href="__METH__/state/1.html">显示中</a>
                <a {if value="$hd.get.state|isset && $hd.get.state==0"}class="cond-tab-active"{/if} href="__METH__/state/0.html">已关闭</a>
            </div>
            <div class="page-nums">
                <span>每页显示：</span>
                <a href="__URL__/nums/15">15</a>
                <a href="__URL__/nums/20">20</a>
                <a href="__URL__/nums/25">25</a>
            </div>
        </div>
        <div class="fn-hide" id="point">{$point}</div>
        <div id="r-list">
            <table class="table-list">
                <tr class="table-list-header">
                    <th width="2%"></th>
                    <th width="18%">职位名称</th>
                    <th width="8%">人数</th>
                    <th width="12%">开始时间</th>
                    <!-- <th width="8%">有效期</th> -->
                    <th>结束时间</th>
                    <th width="6%">审核</th>
                    <th width="8%">修改</th>
                    <th width="6%">状态</th>
                    <th width="6%">刷新</th>
                    <th width="17%">推广</th>
                </tr>
                {if value="!$recruits.data && !isset($_GET['state'])"}
                <tr align="center">
                    <td colspan="9">你还没有发布过职位，<a href="__CONTROL__/issueRecruit">立即发布</a>。</td>
                </tr>
                {/if}
                {foreach from="$recruits.data" value="$list"}
                <tr>
                    <td><label><input type="checkbox" name="id" value="{$list.recruit_id}" /></label></td>
                    <td><a href="__APP__/search/jobs/id/{$list.recruit_id}" target="_blank">{$list.recruit_name}</a></td>
                    {if value="!$list.recruit_num"}
                    <td>若干</td>
                    {else/}
                    <td>{$list.recruit_num}人</td>
                    {/if}
                    <td><?php echo date('Y-m-d H:i:s',$list['start_time']);?></td>
                    <td title="有效期：{$list.effective_time}天"><?php echo date('Y-m-d H:i:s',$list['expiration_time']);?>{if value="$list.expiration_time lt time()"}<span class="expired">(已过期)</span>{/if}</td>
                    <td>
                            {if value="$list['verify']==1"}
                            <img src="__TPL__/images/succ2.png" alt="已通过" title="已通过" />
                            {elseif value="$list['verify']==2" /}
                            <img src="__TPL__/images/q.gif" alt="审核中" title="审核中" />
                            {else /}
                            <img src="__TPL__/images/error.gif" alt="未通过" title="未通过" />
                            {/if}
                    </td>
                    <td>  
                        <a href="__CONTROL__/editRecruit/id/{$list.recruit_id}.html">修改</a>
                    </td>
                    <td>
                        {if value="!$list.state && $list.expiration_time>time()"}
                        <img src="__TPL__/images/error.gif" alt="已关闭" title="已关闭" />
                        {elseif value="$list.expiration_time lt time()" /}
                        <img src="__TPL__/images/error.gif" alt="已过期" title="已过期" />
                        {else/}
                        <img src="__TPL__/images/succ2.png" alt="招聘中" title="招聘中">
                        {/if}
                    </td>
                    <td>
                        <div class="refresh-tips">
                            <a href="###" r-id="{$list.recruit_id}" already="{if value="$list.refresh_date>=strtotime(date('Y-m-d'))"}true{else /}false{/if}" class="refresh" style="z-index:90">刷新</a>
                        </div>
                    </td>
                    <td>
                        <div class="spread-tool">
                        <?php $cate_has=array();$cate=array(1=>'推荐',2=>'加急',5=>'置顶',6=>'变色');?>
                        {foreach from="$list.spread" value="$spread"}
                        <?php $cate_has[]=$spread['cate_id'];?>
                            {if value="$spread.cate_id=='2'"}
                                <span>已加急</span>
                            {elseif value="$spread.cate_id=='1'" /}
                                <span>已推荐</span>
                            {elseif value="$spread.cate_id=='5'" /}
                                <span>已置顶</span>
                            {else /}
                                <span style="color:{$spread.color}">已变色</span>
                            {/if}
                        {/foreach}
                        <?php $diff=array_diff(array_keys($cate),$cate_has);?>
                        {foreach from="$diff" value="$value"}
                        <span><a href="__CONTROL__/addSpread/cate/{$value}/recruit_id/{$list.recruit_id}">{$cate.$value}</a></span>
                        {/foreach}
                    </div>
                    </td>
                </tr>
                {/foreach}
                <tr>
                    <td colspan="6">
                        <div class="opt-tool">
                            <a href="###" type="all" class="select">全选</a>
                            <a href="###" type="invert-select" class="select">反选</a>
                            <a href="###" class="opt" action="update" status="0">关闭选中职位</a>
                            <a href="###" class="opt" action="update" status="1">开启选中职位</a>
                            <a href="###" class="opt" action="del">删除选中职位</a>
                        </div>
                    </td>
                    <td colspan="3">
                        <div class="page-list">{$recruits.page}</div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
<!--/企业招聘管理-->
</div>
<!--/opt-area--> 
</div>
<!--/opt--> 
</div>
<script type="text/javascript">
    var url='__CONTROL__';
</script>
{js file="jquery" /}
{js file="__TPL__/js/company.js" /}
{include file="__TPL__/footer.html" /}